fibo_map = {}

def fibo(count):

    if count in fibo_map:
        value = fibo_map[count]
        print('find fibo(%s) = %s' % (count, value))
        return value

    value = 1
    if count == 1 or count == 2:
        value =  1
    else:
        value = fibo(count - 1) + fibo(count - 2)

    print('compute fibo(%s) = %s' % (count, value))
    fibo_map[count] = value
    return value

def compute_gold_rate():

    for i in range(2, 101):
        rate = fibo_map[i] / fibo_map[i-1]
        rate2 = fibo_map[i - 1] / fibo_map[i]
        print('index = %s, gold rate1 = %.100f' % (i, rate))
        print('index = %s, gold rate2 = %.100f' % (i, rate2))
        print('index = %s, gold cheng = %.100f' % (i, rate2 * rate))



def leijia(count):

    sum = 0
    for i in range(count+1):
        sum += i

    print('sum = %s' % sum)
    return sum



if __name__ == '__main__':
    count = 100
    ret = leijia(count)

    # print('finish fibo(%s) = %s' % (count, ret))

    # compute_gold_rate()